[Chapter 1] Introduction
Author: Bryan Costales & Eric Allman
Date: 1999-01-06T18:32:03Z

#

| Chapter 1 |

# 1. Introduction

Contents:
MUA Versus MTA
Why Is sendmail So Complex?
Three Important Parts
Run sendmail by Hand
The Header
The Body
The Envelope
Things to Try

Imagine yourself with pen and paper, writing a letter to a friend far away. You finish the letter and sign it, reflect on what you've written, then tuck the letter into an envelope. You put your friend's address on the front, your return address in the left-hand corner, and a stamp in the right-hand corner, and the letter is ready for mailing. Electronic mail - ail for short) is prepared in much the same way, but a computer is used instead of pen and paper.

The post office transports real letters in real envelopes, whereas sendmail transports electronic letters in electronic envelopes. If your friend (the recipient) is in the same neighborhood (on the same machine), only a single post office (sendmail running locally) is involved. If your friend is distant, the mail message will be forwarded from the local post office (sendmail running locally) to a distant one (sendmail running remotely) for delivery. Although sendmail is similar to a post office in many ways, it is superior in others:

- Delivery typically takes seconds rather than days.

- Address changes (forwarding) take effect immediately, and mail can be forwarded anywhere in the world.

- Host addresses are looked up dynamically. Therefore, machines can be moved or renamed, and email delivery will still succeed.

- Mail can be delivered through programs that access other networks (such as UUCP and BITNET). This would be like the post office using United Parcel Service to deliver an overnight letter.

This analogy between a post office and sendmail will break down as we explore sendmail in more detail. But the analogy serves a role in this introductory material, so we will continue to use it to illuminate a few of sendmail's more obscure points.

## 1.1 MUA Versus MTA

A mail user agent (MUA) is any of the many programs that users run to read, reply to, compose, and dispose of email. Examples of an MUA include the original UNIX mail program (/bin/mail); the Berkeley Mail program; its System V equivalent (mailx); free software programs such as mush, elm, and mh; and commercial programs such as Zmail. Many MUAs may exist on a single machine. MUAs sometimes perform limited mail transport, but this is usually a very complex task for which they are not suited. We won't be covering MUAs in this book.

A mail transfer agent (MTA) is a highly specialized program that delivers mail and transports it between machines, like the post office. Usually, there is only one MTA on a machine. The sendmail program is an MTA. Others include MMDF, Smail 3.x, and Zmailer, but we'll cover only sendmail in this book.

I. A Tutorial |  | 1.2 Why Is sendmail So Complex?